package ypmits.tween {
	import flash.display.DisplayObject;
	import flash.events.Event;
	import flash.events.EventDispatcher;

	/**
	 * @author Dave Lenz
	 */
	public class YpTween extends EventDispatcher {

		private var object : DisplayObject;
		private var time : Number;
		private var params : Object;

		/**
		 * TODO: Basically everything here ;)
		 */
		public function YpTween( object : DisplayObject, time : Number, params : Object )
		{
			this.object = object;
			this.time = time;
			this.params = params;
			
			start( );
		}

		
		
		private function start() : void 
		{
			addEventListener( Event.ENTER_FRAME, eventHandler );
		}

		
		
		private function eventHandler( e : Event ) : void 
		{
			//object[]
		}
		
		public function set rotation(n : Number) :  void
		{
			object["rotation"].target = n; 
		}
		public function set x(n : Number) : void
		{
			object["x"].target = n; 
		}
		public function set y(n : Number) : void
		{
			object["y"].target = n; 
		}
		public function set scaleX(n : Number) : void
		{
			object["scaleX"].target = n; 
		}
		public function set scaleY(n : Number) : void
		{
			object["scaleY"].target = n; 
		}
		
		public function get rotation() : Number
		{
			return object["rotation"].target; 
		}
		public function get x() : Number
		{
			return object["x"].target; 
		}
		public function get y() : Number
		{
			return object["y"].target; 
		}
		public function get scaleX() : Number
		{
			return object["scaleX"].target; 
		}
		public function get scaleY() : Number
		{
			return object["scaleY"].target ; 
		}
	}
}
